﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LowLevelGraphics.Filter
{
    /// <summary>
    ///Bridges unconnected pixels, that is, sets 0-valued pixels to 1
    ///if they have two nonzero neighbors that are not connected. For example:
    ///1  0  0           1  1  0 
    ///1  0  1  becomes  1  1  1 
    ///0  0  1           0  1  1
    /// </summary>
    public class Branchpoints : BaseImageFilter
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Branchpoints"/> class.
        /// </summary>
        public Branchpoints()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Branchpoints"/> class.
        /// </summary>
        /// <param name="_branchPoints">The _branch points.</param>
        internal Branchpoints(Branchpoints _branchPoints)
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="_bitmap"></param>
        /// <returns></returns>
        public override UnsafeBitmap Execute(UnsafeBitmap _bitmap)
        {
            return base.Execute(_bitmap);
        }

        /// <summary>
        /// This is used to clone a filter, each filter must implement it's own clone functionality
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            return new Branchpoints(this);
        }
    }
}
